<div id="main_wrap">
	<div class="center_wrap clearfix">
        <h2 class="no_bottom no_top breadcrumb">
        	<a>My Playlists</a>
        </h2>
		{include file="accountmenu.tpl"} 
		<div class="right col1">
            <div class="cat_box_full clearfix" id="browse_main"> 
            	{*<p class="right results">{if $error eq ""}{$beginning} - {$ending} {$lang61} {$total} {$lang796}{/if}</p>
                <ul id="search_nav" class="clearfix">
                    <li class="current">{$showtitle}<span></span></li>
                </ul>*}
				<table width="100%" cellspacing="3" cellpadding="3" border="0">
					<tr>
						<td valign="top">
							<h2>My playlists</h2>
						</td>
                    </tr>
					<tr>
						<td valign="top">
							<a href="{$baseurl}/create_playlist.php">Create new playlist</a>
						</td>
					</tr>
					{if $deleteMsg neq ""}
						<tr>
							<td>
								<div id="smsg" class="errorPage clearfix" style="">
									<h2 style="font-size:18px">{$deleteMsg}</h2>
								</div>
							</td>
						</tr>
					{/if}	
				</table>	
                <div class="cat_body_full clearfix">
                {if $error ne ""}
                {include file="show_error.tpl"}
                {/if}
                {if $message ne ""}
                {include file="show_message.tpl"}
                {/if}
                  
                  <!-- LOOP START -->
				  <div id="browse_results">
				  {if $listplaylists|@count gt 0}
				  <form id="deleteform" name="deleteform" action="{$action}" method="post" onsubmit="return chkPlaylist();" >
				  <ul>
				  	{section name=i loop=$listplaylists}
							<li class="video">
								<div class="video_i">
									<a href="{$baseurl}/view_playlist.php?ID={$listplaylists[i].PLAYLISTID}">
										<img class="imag" height="87" width="116" alt="{$listaudios[i].playlist_title|stripslashes}" src="{$baseurl}/images/tjj_music_dj_headset.png" />
										<div class="tag"></div>
									</a>
									<a href="{$baseurl}/view_playlist?ID={$listplaylists[i].PLAYLISTID}">
										<span class="artist_name">{$listplaylists[i].playlist_title|stripslashes}</span>
									</a>
									<p>Delete playlist <input type="checkbox" name="deleteplaylist[]" value="{$listplaylists[i].PLAYLISTID}"></p>
									
								</div>
							</il>
						{/section}	
					</ul>
                    
				  <div class="clear"></div>
                  <input type="submit" name="submitdelete" value="{$lang485}" />
				  {/if}
				  </form>
				  </div>
                  <!-- LOOP END -->
    
                </div>

                <div class="paginate">
                	{$pagelinks}
                    {*<p class="left">{if $error eq ""}{$beginning} - {$ending} {$lang61} {$total} {$lang796}{/if}</p>*}
                </div>
  			</div>
		</div>
    	<div class="clear"></div>
	</div>
</div>
{literal}
<script type="text/javascript">
var $j = jQuery.noConflict();
	function chkPlaylist(){
	
		var atLeastOneIsChecked = jQuery('input[name="deleteplaylist[]"]:checked').length;
		if(atLeastOneIsChecked<=0){
			alert("Please select atleast one playlist to delete.");
			return false;
		}
		else 
			return true;
	}
</script>
{/literal}